RMGR

Section: User Commands (1)
Updated: 14 October 1990
Index Return to Main Contents
 

NAME

rmgr - remote graphical window manager  

SYNOPSIS

rmgr [ -n windowname ] [ cmdargs]
rmgr -r [ host.tty] is a client for MGR, the Bellcore window manager, that multiplexes a communications line between several processes (typically interactive shells). As the name implies, the program is meant to be run on a host other than where the MGR server resides. Rmgr creates a window on the local MGR server for each process spawned on the remote host. Each process has the full facilities of MGR at its disposal.

When rmgr is called, it creates a single window with a shell; the pathname of the shell is taken from the environment symbol $SHELL; if this is not defined, "/bin/sh" is used. New windows can be created at any time by calling rmgr from within a previously created window. The program to be started in a newly created window and optional arguments to the program can be supplied when rmgr is invoked. For instance,

rmgr csh

will create a window with a C-Shell and switch to that window. When the process associated with the currently displayed window terminates (e.g. ^D has been typed to a shell), rmgr switches to the previously displayed window; when no more windows are left, rmgr exits.

When "/etc/utmp" is writable by rmgr, an appropriate record is written to this file for each window and removed when the window is terminated.

The -r option is used to resume a rmgr session that has been detached from the terminal by means of the "Detach" menu option (see below). This mechanism allows a user to disconnect rmgr together with all currently active windows from the terminal and resume it at a later point in time, e.g. at a later login session, and even from a different MGR host. When more than one detached session exists, the -r option displays a list of host.tty pairs identifying the detached sessions. In this case an additional host.tty argument can be given to resume a specific rmgr session.  

MENU ITEMS

Rmgr adds two menus to each window it creates, invoked by pressing the right mouse button. The first three menu items are simply place-holders. The first item is a title-bar, reading "MGR Windows =>", the second item is the name of the currently selected window, and the third is a dividing line. No actions are associated with these three items. The rest of this menu shows the available commands:
Shell Window
Create a new window with a shell and switch to that window.
Other Window
Create a new window, switch to that window, and prompt for a command to run in the window. A window name may also be specified by typing "-n windowname" at the beginning of the line.
Kill Window
Close the current window and kill its associated process.
Suspend
Suspend rmgr. The window context is pushed onto the environment stack.
Detach
Detach rmgr (put it into the background and disconnect it from its control terminal). This also pushes the window context onto the environment stack, in case the session will be resumed without first destroying any created windows. A detached rmgr session may be resumed by invoking rmgr with the -r option. Rmgr maintains a circular buffer for the last 2048 bytes written to each window, and will replay the contents of each window when the session is resumed and the windows are recreated. Note that detached processes continue to run, and may continue to generate output. So while the buffer will usually preserve all necessary context, sometimes it may lose information, but it will almost always yield an accurate representation of what the window should contain.
Quit     
Kill all windows and terminate rmgr.

The "MGR Windows =>" menu item is linked to a second menu. Moving the mouse to that item and sliding right displays the menu, a list of the names of all currently active rmgr windows. Selecting any of these items will cause the associated window to pop forward and become the active window. Of course, windows may always be selected in the usual manner, i.e., move the mouse cursor to the window and click the left button.  

OPERATION DETAILS

When rmgr is invoked, it pushes a number of elements of the current window environment onto the stack, including the current font, window size and location, defined menus, events, and text regions, and mode flags. It then sets up an escape code to be used for its own event and menu strings. Then the main window is moved to the top left corner of the screen and resized to 80 columns by 24 rows of text. Codes are set for window activation, destruction, and reshaping, and the menus are downloaded to the window in menu slots 1 and 2. Finally, a shell (or other process, if specified) is started in the window. New windows are always created near the top left corner of the screen, in the default font, sized for 80 columns by 24 rows. If the window is resized, rmgr will attempt to inform the remote process of the new window size. The window's name defaults to the command name if no other name is explicitly given. Killing a window closes its control terminal and should cause the associated processes to terminate. If a process in an obscured window (i.e., a window that is not the active window) terminates, the window is not closed. Instead, the message "[window shut down]" is written in the window. The window may be removed by activating it, and then using either the rmgr "Kill Window" option, or the system "destroy" option. This behavior is intended to prevent inadvertent loss of information when a hidden window is exited. Also, window 0, the main window, is never closed, though it may be reused any number of times for different commands. Rmgr may be suspended to temporarily disable the alternate windows and allow direct communication with the remote host. This is most useful for users dialing up on a serial line, who may wish to perform some file transfer functions, and then resume the windowing sessions. As with a detached session, the processes in the various windows are not stopped, and may continue to generate output. The windows created by rmgr remain on the screen, and should not be destroyed while rmgr is suspended. They may safely be selected for viewing, and moved around, but should not be changed in any way, or else when rmgr is restarted the program will get confused. The Detach option should be used if the alternate windows are likely to be modified or nonexistent by the time the rmgr session is resumed. When a detached rmgr session is resumed, rmgr polls the MGR server to see which alternate windows exist, if any. If the same windows exist as at the time of detachment, then no special state restoration is performed. If, instead, alternate windows exist which rmgr didn't expect to find, they are destroyed. Also, if expected windows are missing, they are recreated and the contents of the history buffer are replayed into the new window. This polling process is not particularly clever; the only checks are that the window IDs and text dimensions match, so it is possible to artifically create an environment that fits what rmgr expected to find, thus bypassing the restoration of state, but it would be silly to try to contrive this situation. Usually resuming a detached session will recreate all the alternate windows in nearly the exact same state as they were before, plus any new output that may have appeared. Also, if any processes terminated while rmgr was detached, their windows will still be created, but will have the "[window shut down]" message attached. (This is also true when resuming a suspended session.) All new windows are created with the TERM and TERMCAP variables set. Most MGR clients that expect to talk directly to the MGR server can also work normally through rmgr . However, any client that directs queries to the MGR server and needs a reply can only run if its window is the active window. This is a necessary restriction, because MGR doesn't tag replies with the window ID of the intended recipient, so rmgr simply feeds the data to the active window. Clients that only issue commands and never expect replies should be able to work regardless of whether their window is active or obscured. However, it is still possible that some commands will get garbled, as rmgr does no interpretation of the data streams sent by the alternate windows, and does not guard against escape sequences being split or interleaved with data from other windows. Perhaps a future version of rmgr will address these issues.  

FILES

$(HOME)/.rmgr/host.ttySocket created by rmgr

/etc/utmp Login records
 

SEE ALSO

termcap(5), utmp(5)
MGR, a window system for Unix, by Stephen A. Uhler, Bell Communications Research  

AUTHOR

Howard Chu @ University of Michigan, hyc@math.lsa.umich.edu Derived from screen by Oliver Laumann @ Technical University of Berlin


 

Index

NAME
SYNOPSIS
MENU ITEMS
OPERATION DETAILS
FILES
SEE ALSO
AUTHOR

This document was created by man2html, using the manual pages.
Time: 16:01:42 GMT, March 03, 2023